import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "home",
    component: () => import("../views/home/Home"),
    meta: {
      title: "首页",
      isShow: true,
    },
  },
  {
    path: "/classification",
    name: "classification",
    component: () => import("../views/classification/Classification"),
    meta: {
      title: "分类",
      isShow: true,
    },
  },
  {
    path: "/cart",
    name: "cart",
    component: () => import("../views/cart/Cart"),
    meta: {
      title: "购物车",
      isShow: true,
    },
  },
  {
    path: "/my",
    name: "my",
    component: () => import("../views/my/My"),
    meta: {
      title: "我的",
      isShow: true,
    },
  },
];

const router = new VueRouter({
  routes,
});

export default router;
